<?php
require(dirname(dirname(__FILE__))."/Config/config.php");
require(dirname(dirname(__FILE__))."/jssdk.php");
class loginController extends appController{
    //登录并且获取用户信息
    public function getUserInfo()
    {
        $wxid = $this->get_user_info();
        //当前用户的微信信息
        $info = Model('rchat')->get_record($wxid);
        $res['error'] = 0;
        $res['result'] = $info;
        die($_REQUEST['callback']."(".json_encode($res).")");
    }
    
    public function isLogin()
    {
        //微信分享参数构建
        $jsdk = Model("app") ->get_jsdk_post();
        $result = array("error"=>0,"jsdk"=>$jsdk);
        $this->showMsg($result);
    }
}